home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic 4 Database How-To
/
Visual Basic 4 Database - How-to (The Waite Group)(1995).iso
/
server.ba_
/
server.ba
Wrap
Text File
|
1995-07-05
|
1KB
|
39 lines
Attribute VB_Name = "Module1"
Option Explicit
Public Const APP_NAME = "BIBLIO Server"
Public LastError As Integer
Public Const ERR_DATABASENOTSPECIFIED = 32767
Public Const ERR_CANTFINDRECORD = 32766
Public Const ERR_TOOMANYRECORDS = 32765
Public Const ERR_WRONGVARTYPE = 32764
Public Const ERR_OBJECTNOTINITIALIZED = 32763
Public Const ERR_INVALIDPUBLISHERID = 32762
Public Const ERR_INVALIDAUTHORID = 33761
Public Const ERR_INVALIDISBN = 32760
Sub Main()
End Sub
Sub ErrorHandler(icons As Integer)
Dim msg As String
Select Case LastError
Case ERR_DATABASENOTSPECIFIED
msg = "No database has been specified."
Case ERR_CANTFINDRECORD
msg = "Can't find the specified record."
Case ERR_TOOMANYRECORDS
msg = "More than one record exists with the specified value(s)."
Case ERR_WRONGVARTYPE
msg = "Did not expect that variant type."
Case ERR_OBJECTNOTINITIALIZED
msg = "The object has not been initialized."
Case Else
msg = "Error " & LastError
End Select
MsgBox msg, icons, APP_NAME
End Sub